<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="utf-8"/>
	<title>Vue基础</title>
	<script src="vue.js" type="text/javascript"></script>
</head>
<body>
	<div id="app">
		<!-- <input type="button" value="v-on指令" v-on:click="doIt">
		<input type="button" value="v-on简写" @click="doIt">
		<input type="button" value="双击事件" @dblclick="doIt"> -->
		<h2 @click="changeFood">{{ food }}</h2>
	</div>
	<script type="text/javascript">
		var app=new Vue({
			el:"#app",
			data:{
				food:"番茄炒蛋"
			},
			/* methods:{
				doIt:function(){
					alert("做IT");
				}, */
				changeFood:function(){
					//console.log(this.food);
					this.food+='好好吃！'
				}
			},
		})
	</script>
</body>
</html>

